import axios from 'axios';
import qs from 'query-string';

export interface ScoreLogId {
    id: number;
}

export interface ScoreLogRecord {
    id: number;
}

export interface ScoreLogListRes {
    list: ScoreLogRecord[];
    total: number;
}

export interface ScoreLogModel {
    id: number;
}

export interface ScoreLogParams extends Partial<ScoreLogRecord> {
    current: number;
    pageSize: number;
}

/**
 * 列表
 * @param params
 * @author abei
 */
export function queryScoreLogList(params:ScoreLogParams) {
    return axios.get<ScoreLogListRes>('/admin/score-log/index', {
        params,
        paramsSerializer: (obj) => {
            return qs.stringify(obj);
        },
    });
}

export function del(id: number) {
    return axios.post('/admin/score-log/del', { id });
}